package api

import (
	"gitee.com/chuanjinge/gopkgserv/api/controller"

	"gitee.com/chuanjinge/gopkgserv/router/middleware"
	"github.com/gin-gonic/gin"
)

func RegisterExamRoutes(r *gin.Engine) {

	examGroup := r.Group("/exam", middleware.AuthMiddleware())

	newExamController := &controller.NewExamController{}
	examGroup.POST("/newexam", newExamController.NewExam)

	examController := &controller.ExamController{}
	examGroup.GET("/getquestions", examController.GetQuestions)
	examGroup.POST("/submit", examController.Submit)
	examGroup.GET("/recent", examController.Recent)
	examGroup.GET("/record", examController.Record)

}
